package jmine.tec.utils.annotation.visitor;

import java.lang.annotation.Annotation;
import java.util.Collection;

/**
 * {@link AnnotationVisitor} que visita as annotations presentes na declaracao de classes
 * 
 * @author takeshi
 * @param <R>
 */
public interface ClassAnnotationVisitor<R> {

    /**
     * Visita a annotation
     * 
     * @param annotation Annotation
     * @param declared classe que declara a annotation
     * @return {@link Collection} de R
     */
    Collection<R> onTypeAnnotation(Annotation annotation, Class<?> declared);

    /**
     * Deve devolver <code>true</code> se esta anotacao deve ser lida
     * 
     * @param annotation {@link Annotation}
     * @param declaring {@link Class}
     * @return boolean
     */
    boolean acceptsClassAnnotation(Annotation annotation, Class<?> declaring);

}
